tests: Declare previously invalid CSS as valid now
authorBenjamin Otte <otte@redhat.com>
Wed, 20 Jul 2011 10:02:00 +0000 (12:02 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 21 Jul 2011 00:43:54 +0000 (02:43 +0200)
The CSS is valid, it might just not work (though most of it will for
siblings).

gtk/tests/stylecontext.c

index 2849180f45e14887dfad9b03e5729eff17afe45a..b107515433595fd2676d678221d037bb0666b08f 100644 (file)
@@ -41,13 +41,6 @@ test_parse_selectors (void)
     "E, F /* comment here */ {}",
     "E,/* comment here */ F {}",
     "E1.e1_2 #T3_4 {}",
-    NULL
-  };
-
-  const gchar *invalid[] = {
-    /* nth-child and similar pseudo classes can only
-     * be used with regions, not with types
-     */
     "E:first-child {}",
     "E:last-child {}",
     "E:nth-child(first) {}",
@@ -55,9 +48,6 @@ test_parse_selectors (void)
     "E:nth-child(even) {}",
     "E:nth-child(odd) {}",
     "E:sorted {}",
-    /* widget state pseudo-classes can only be used for
-     * the last element
-     */
     "E:focused tab {}",
      NULL
   };
@@ -74,16 +64,6 @@ test_parse_selectors (void)
 
       g_object_unref (provider);
    }
-
-  for (i = 0; invalid[i]; i++)
-    {
-      provider = gtk_css_provider_new ();
-      res = gtk_css_provider_load_from_data (provider, invalid[i], -1, &error);
-      g_assert_error (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_FAILED);
-      g_assert (!res);
-      g_object_unref (provider);
-      g_clear_error (&error);
-   }
 }
 
 static void